#include <iostream>
#include <string.h>
#include <algorithm>
using namespace std;


int dfs(int *s,int *t,int n){
	int middle=(t-s)/2;
	if(middle == 0){
		if(s[0] > n)
			return -1;
		else
			return 0;
	}
	if(s[middle-1] > n  &&  s[middle] <= n)
		return middle;
	if(s[middle] > n)
		return dfs(s,s+middle,n);
	else
		return dfs(s+middle+1,t,n)+middle+1;
}


bool cmp(int a,int b){
	return a>b;
}


int main(){
	int n;
	cin>>n;
	int a[n]={0},b[n],ans[n]={0};
	ans[0] = n;
	for(int i=0;i<n;i++){
		int l;
		cin>>l;
		a[l-1]++;
	}
	sort(a,a+n,cmp);
	for(int k=2;k<=n;k++){
		memcpy(b,a,sizeof(a));
//		bool tf=true;
		while(true){
			if(b[k-1] == 0)
				break;
			if(b[k] == 0){
				ans[k-1]++;
				break;
			}
			int l;
			l = b[k-1]-b[k]+1;
			for(int i=0;i<k;i++)
				b[i] -= l;
			ans[k-1] += l;
			l = dfs(b+k,b+n,b[k-1]);
			if(l < 0)
				sort(b,b+n,cmp);
			else
				sort(b,b+k+l,cmp);
		}
	}
	for(int i=0;i<n;i++)
		cout<<ans[i]<<endl;
	return 0;
}
